package com.easyedu.student.dao;

import com.easyedu.core.entity.po.OpenCourse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author lmr
 **/
@Mapper
public interface CourseDao {

    /**
     * 功能描述: 获取可选课程
     *
     * @param schoolYear   0 开放学年
     * @param instituteId  1 开课学院id
     * @param departmentId 2 开课专业id
     * @param openYear     3 开放年份
     * @param semester     4 开放学期
     * @return : java.util.List<com.easyedu.api.entity.DO.OpenCourse>
     **/
    @Select("select * from open_course where open_year = #{openYear} AND school_year = #{schoolYear} AND semester = #{semester}" +
            " AND open_institute_id = #{instituteId} AND open_department_id = #{departmentId}")
    List<OpenCourse> getOptionalCourse(Integer openYear, Long instituteId, Long departmentId, String schoolYear,
                                       String semester);
}
